package com.jmy.pageresult;

import java.io.Serializable;

/**
 * @author: VE
 * @DATE: 2022/9/24 15:55
 * 描述:
 */
public class PageResult implements Serializable {
    private Integer state;
    private String msg;
    private Object object;

    public static PageResult success(String msg, Object o){
        return new PageResult(200,msg,o);
    }
    public static PageResult none(String msg){
        return new PageResult(200,msg,null);
    }public static PageResult error(){
        return new PageResult(500,"发生异常",null);
    }

    private PageResult(Integer state, String msg, Object object) {
        this.state = state;
        this.msg = msg;
        this.object = object;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }
}
